package main

import (
	"flag"
	"fmt"
	"log"
	"net/http"
)

func main() {

	var port int
	var path string

	flag.IntVar(&port, "port", 80, "web server port")
	flag.StringVar(&path, "path", "html", "html path")

	flag.Parse()

	fmt.Println("path:", path)
	fmt.Println("port:", port)

	http.Handle("/", http.FileServer(http.Dir(path)))

	log.Fatal(http.ListenAndServe(fmt.Sprintf("0.0.0.0:%d", port), nil))

}
